<?php

class DepositSetController extends BaseController
{

	/**
	 * 保证金设置
	 */
	public function actionAdmin()
	{
		if(isset($_POST['Category_deposit'])){
			foreach($_POST['Category_deposit'] as $key=>$val){
				$category = Category::model()->findByPk($key);
				$category->zca_deposit = $val;
				if(!$category->save()){
					$this->render('../index/error',array('message'=>'对不起，保证金设置失败，请稍后再试！'));
					exit;
				}
			}
		}

		$this->render('admin');
	}

}
